Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move commitment checks to block's syntactical check. #475

Merged
merged 13 commits into from
Aug 10, 2023

Conversation

piotrm50
Copy link
Contributor

@piotrm50 piotrm50 commented Aug 4, 2023

Description of change

Move commitment checks to block's syntactical check.
Cleanup of block's and transaction's syntactical checks for APIv3.
Implement test to make sure that the validation works correctly.
Definition of minCommitableAge and maxCommitableAge is updated to take into account the current, unfinished slot. So for example, with minCommittableAge=10 and maxCommittableAge=20, a block issued in the middle of slot 100 can commit at most to 90 (100-10) and at least to slot 80 (100-20). Previously it was 89 and 79 respectively, because it meant 10 full slots, so we had to artificially add 1 to min/maxCommittableAge to get the correct value in most checks.

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • My code follows the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests using ginkgo that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@piotrm50 piotrm50 marked this pull request as ready for review August 9, 2023 13:00
@piotrm50 piotrm50 merged commit 43a6977 into serix-iota-core Aug 10, 2023
4 checks passed
@piotrm50 piotrm50 deleted the feat/move-commitment-checks branch August 10, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move min/max committable age checks and input commitment check from filter to syntactical block validation
2 participants